package com.subang.function.service.impl;

import com.subang.function.domain.ShenlunQuestions;
import com.subang.function.mapper.ShenlunQuestionsMapper;
import com.subang.function.service.IShenlunQuestionsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 申论问题Service业务层处理
 * 
 * @author subei
 * @date 2025-02-26
 */
@Service
public class ShenlunQuestionsServiceImpl implements IShenlunQuestionsService 
{
    @Autowired
    private ShenlunQuestionsMapper shenlunQuestionsMapper;

    /**
     * 查询申论问题
     * 
     * @param id 申论问题主键
     * @return 申论问题
     */
    @Override
    public ShenlunQuestions selectShenlunQuestionsById(Long id)
    {
        return shenlunQuestionsMapper.selectShenlunQuestionsById(id);
    }

    /**
     * 查询申论问题列表
     * 
     * @param shenlunQuestions 申论问题
     * @return 申论问题
     */
    @Override
    public List<ShenlunQuestions> selectShenlunQuestionsList(ShenlunQuestions shenlunQuestions)
    {
        return shenlunQuestionsMapper.selectShenlunQuestionsList(shenlunQuestions);
    }

    /**
     * 新增申论问题
     * 
     * @param shenlunQuestions 申论问题
     * @return 结果
     */
    @Override
    public int insertShenlunQuestions(ShenlunQuestions shenlunQuestions)
    {
        return shenlunQuestionsMapper.insertShenlunQuestions(shenlunQuestions);
    }

    /**
     * 修改申论问题
     * 
     * @param shenlunQuestions 申论问题
     * @return 结果
     */
    @Override
    public int updateShenlunQuestions(ShenlunQuestions shenlunQuestions)
    {
        return shenlunQuestionsMapper.updateShenlunQuestions(shenlunQuestions);
    }

    /**
     * 批量删除申论问题
     * 
     * @param ids 需要删除的申论问题主键
     * @return 结果
     */
    @Override
    public int deleteShenlunQuestionsByIds(Long[] ids)
    {
        return shenlunQuestionsMapper.deleteShenlunQuestionsByIds(ids);
    }

    /**
     * 删除申论问题信息
     * 
     * @param id 申论问题主键
     * @return 结果
     */
    @Override
    public int deleteShenlunQuestionsById(Long id)
    {
        return shenlunQuestionsMapper.deleteShenlunQuestionsById(id);
    }

    /**
     * 删除申论问题信息
     *
     * @param id 申论试卷ID
     * @return 结果
     */
    @Override
    public int deleteShenlunQuestionsByPaperId(String  id)
    {
        return shenlunQuestionsMapper.deleteShenlunQuestionsByPaperId(id);
    }
}
